package com.company.cloud.pay.modules.third.factory;

import com.company.cloud.pay.modules.api.constant.PayChannelEnum;
import com.company.cloud.pay.modules.third.service.AliCloudPayApiService;
import com.company.cloud.pay.modules.third.service.WxCloudPayApiService;


public class CloudPayApiFactory {

    public static CloudPayApiService getCloudPayApi(String channel) {
        if (PayChannelEnum.WX_PAY.getCode().equals(channel)) {
            return new WxCloudPayApiService();
        } else if (PayChannelEnum.Ali_PAY.getCode().equals(channel)) {
            return new AliCloudPayApiService();
        } else {
            return null;
        }
    }

}
